/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * EditServiceTask.java
 *
 * Created on Mar 15, 2009, 4:20:48 PM
 */

package magis;

/**
 *
 * @author Brady
 */
public class EditServiceTask extends javax.swing.JFrame {

    /** Creates new form EditServiceTask */
    public EditServiceTask() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        st1_group = new javax.swing.JPanel();
        st1_laborAndAddPartGroup = new javax.swing.JPanel();
        st1_laborGroup = new javax.swing.JPanel();
        st1_laborDispl_lbl = new javax.swing.JLabel();
        st1_labor_txt = new javax.swing.JTextField();
        st1_addPartGroup = new javax.swing.JPanel();
        st1_addPart_cmb = new javax.swing.JComboBox();
        st1_addPartQuantity_txt = new javax.swing.JTextField();
        st1_addPart_btn = new javax.swing.JButton();
        st1_partsAndTotalsGroup = new javax.swing.JPanel();
        st1_partsListGroup = new javax.swing.JPanel();
        st1_partsListScrollPane = new javax.swing.JScrollPane();
        st1_PartsJList = new javax.swing.JList();
        st1_removeButtonGroup = new javax.swing.JPanel();
        st1_removePart_btn = new javax.swing.JButton();
        st1_totalsGroup_pnl = new javax.swing.JPanel();
        st1_tax_lbl = new javax.swing.JLabel();
        st1_partsTotal_lbl = new javax.swing.JLabel();
        st1_subtotal_lbl = new javax.swing.JLabel();
        st1_partsTotalDisplay_lbl = new javax.swing.JLabel();
        st1_subtotalDisplay_lbl1 = new javax.swing.JLabel();
        st1_taxDisplay_lbl = new javax.swing.JLabel();
        st1_partsTotal_lbl1 = new javax.swing.JLabel();
        st1_laborDisplay_lbl = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(new java.awt.FlowLayout());

        st1_group.setBorder(javax.swing.BorderFactory.createTitledBorder("Brake Job"));
        st1_group.setPreferredSize(new java.awt.Dimension(450, 200));
        st1_group.setLayout(new javax.swing.BoxLayout(st1_group, javax.swing.BoxLayout.Y_AXIS));

        st1_laborAndAddPartGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        st1_laborGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Labor"));
        st1_laborGroup.setPreferredSize(new java.awt.Dimension(134, 55));

        st1_laborDispl_lbl.setText("Labor Hours:");
        st1_laborGroup.add(st1_laborDispl_lbl);

        st1_labor_txt.setText("2");
        st1_labor_txt.setPreferredSize(new java.awt.Dimension(20, 20));
        st1_laborGroup.add(st1_labor_txt);

        st1_laborAndAddPartGroup.add(st1_laborGroup);

        st1_addPartGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Add Part"));

        st1_addPart_cmb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "brake pad", "brake fluid", "transfer case", "timing belt" }));
        st1_addPartGroup.add(st1_addPart_cmb);

        st1_addPartQuantity_txt.setText("2");
        st1_addPartQuantity_txt.setPreferredSize(new java.awt.Dimension(20, 20));
        st1_addPartGroup.add(st1_addPartQuantity_txt);

        st1_addPart_btn.setFont(new java.awt.Font("Tahoma", 0, 8)); // NOI18N
        st1_addPart_btn.setText("+");
        st1_addPart_btn.setMargin(new java.awt.Insets(2, 2, 2, 2));
        st1_addPart_btn.setMinimumSize(new java.awt.Dimension(20, 19));
        st1_addPart_btn.setPreferredSize(new java.awt.Dimension(25, 19));
        st1_addPart_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                st1_addPart_btnActionPerformed(evt);
            }
        });
        st1_addPartGroup.add(st1_addPart_btn);

        st1_laborAndAddPartGroup.add(st1_addPartGroup);

        st1_group.add(st1_laborAndAddPartGroup);

        st1_partsAndTotalsGroup.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        st1_partsListGroup.setBorder(javax.swing.BorderFactory.createTitledBorder("Parts List"));
        st1_partsListGroup.setLayout(new javax.swing.BoxLayout(st1_partsListGroup, javax.swing.BoxLayout.Y_AXIS));

        st1_partsListScrollPane.setPreferredSize(new java.awt.Dimension(200, 50));

        st1_PartsJList.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        st1_PartsJList.setMinimumSize(new java.awt.Dimension(33, 30));
        st1_PartsJList.setPreferredSize(new java.awt.Dimension(100, 30));
        st1_partsListScrollPane.setViewportView(st1_PartsJList);

        st1_partsListGroup.add(st1_partsListScrollPane);

        st1_removeButtonGroup.setPreferredSize(new java.awt.Dimension(302, 25));

        st1_removePart_btn.setFont(new java.awt.Font("Tahoma", 0, 8)); // NOI18N
        st1_removePart_btn.setText("Remove Part");
        st1_removePart_btn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                st1_removePart_btnActionPerformed(evt);
            }
        });
        st1_removeButtonGroup.add(st1_removePart_btn);

        st1_partsListGroup.add(st1_removeButtonGroup);

        st1_partsAndTotalsGroup.add(st1_partsListGroup);

        st1_totalsGroup_pnl.setLayout(new java.awt.GridBagLayout());

        st1_tax_lbl.setText("$66.75");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        st1_totalsGroup_pnl.add(st1_tax_lbl, gridBagConstraints);

        st1_partsTotal_lbl.setText("$20.00");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0);
        st1_totalsGroup_pnl.add(st1_partsTotal_lbl, gridBagConstraints);

        st1_subtotal_lbl.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        st1_subtotal_lbl.setText("$256.75");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        st1_totalsGroup_pnl.add(st1_subtotal_lbl, gridBagConstraints);

        st1_partsTotalDisplay_lbl.setText("Parts:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 8);
        st1_totalsGroup_pnl.add(st1_partsTotalDisplay_lbl, gridBagConstraints);

        st1_subtotalDisplay_lbl1.setText("Subtotal:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 2, 0, 6);
        st1_totalsGroup_pnl.add(st1_subtotalDisplay_lbl1, gridBagConstraints);

        st1_taxDisplay_lbl.setText("Tax:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 8);
        st1_totalsGroup_pnl.add(st1_taxDisplay_lbl, gridBagConstraints);

        st1_partsTotal_lbl1.setText("$66.75");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        st1_totalsGroup_pnl.add(st1_partsTotal_lbl1, gridBagConstraints);

        st1_laborDisplay_lbl.setText("Labor:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 7);
        st1_totalsGroup_pnl.add(st1_laborDisplay_lbl, gridBagConstraints);

        st1_partsAndTotalsGroup.add(st1_totalsGroup_pnl);

        st1_group.add(st1_partsAndTotalsGroup);

        getContentPane().add(st1_group);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void st1_addPart_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_st1_addPart_btnActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_st1_addPart_btnActionPerformed

    private void st1_removePart_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_st1_removePart_btnActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_st1_removePart_btnActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new EditServiceTask().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JList st1_PartsJList;
    private javax.swing.JPanel st1_addPartGroup;
    private javax.swing.JTextField st1_addPartQuantity_txt;
    private javax.swing.JButton st1_addPart_btn;
    private javax.swing.JComboBox st1_addPart_cmb;
    private javax.swing.JPanel st1_group;
    private javax.swing.JPanel st1_laborAndAddPartGroup;
    private javax.swing.JLabel st1_laborDispl_lbl;
    private javax.swing.JLabel st1_laborDisplay_lbl;
    private javax.swing.JPanel st1_laborGroup;
    private javax.swing.JTextField st1_labor_txt;
    private javax.swing.JPanel st1_partsAndTotalsGroup;
    private javax.swing.JPanel st1_partsListGroup;
    private javax.swing.JScrollPane st1_partsListScrollPane;
    private javax.swing.JLabel st1_partsTotalDisplay_lbl;
    private javax.swing.JLabel st1_partsTotal_lbl;
    private javax.swing.JLabel st1_partsTotal_lbl1;
    private javax.swing.JPanel st1_removeButtonGroup;
    private javax.swing.JButton st1_removePart_btn;
    private javax.swing.JLabel st1_subtotalDisplay_lbl1;
    private javax.swing.JLabel st1_subtotal_lbl;
    private javax.swing.JLabel st1_taxDisplay_lbl;
    private javax.swing.JLabel st1_tax_lbl;
    private javax.swing.JPanel st1_totalsGroup_pnl;
    // End of variables declaration//GEN-END:variables

}
